          <ul class="pcjs-explorer-top">
            <li id="pcjs-documents" class="pcjs-explorer-fixed">Documents
              <ul>
    {%- for group in site.data.documents -%}
      {%- if site.developer %}
                <!-- group: {{ group[0] }} -->
      {%- endif -%}
      {%- capture group_type -%}{{ group[0] }}{%- endcapture -%}
      {%- capture docs_path1 -%}/{{ group[0] }}{%- endcapture %}
                <li class="pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ group[1]['@title'] }}
                  <ul>
        {%- for category in group[1] -%}
          {%- if site.developer %}
                    <!-- category: {{ category[0] }} -->
          {%- endif -%}
          {%- if category[0] == "@instances" -%}
            {%- assign subcategories = group[1] -%}
            {%- capture docs_path2 -%}{%- endcapture -%}
          {%- elsif category[0] contains '@' -%}
            {%- continue -%}
          {%- else -%}
            {%- assign subcategories = category[1] -%}
            {%- capture docs_path2 -%}/{{ category[0] }}{%- endcapture -%}
            {%- capture docs_url -%}{{ docs_path1 }}{{ docs_path2 }}{%- endcapture -%}
            {%- capture attrs -%}id="documents-{{ docs_url | remove_first: "/" | replace: "/", "-" }}" class="pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)"{%- if category[1]['@desc'] %} title="{{ category[1]['@desc'] }}"{%- endif -%}{%- endcapture %}
                    <li {{ attrs }}>{{ category[1]['@title'] }}
                      <ul>
          {%- endif -%}
          {%- for subcategory in subcategories -%}
            {%- if site.developer %}
                        <!-- subcategory: {{ subcategory[0] }} -->
            {%- endif -%}
            {%- if subcategory[0] == "@instances" -%}
              {%- capture docs_path3 -%}{%- endcapture -%}
            {%- elsif subcategory[0] == "@documents" -%}
              {%- assign documents = subcategory[1] -%}
              {%- include explorer/doclinks.html docs=documents -%}
              {%- continue -%}
            {%- elsif subcategory[0] contains '@' -%}
              {%- continue -%}
            {%- else -%}
              {%- capture docs_path3 -%}/{{ subcategory[0] }}{%- endcapture -%}
              {%- capture docs_url -%}{{ docs_path1 }}{{ docs_path2 }}{{ docs_path3 }}{%- endcapture -%}
              {%- capture attrs -%}id="documents-{{ docs_url | remove_first: "/" | replace: "/", "-" }}" class="pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)"{%- if subcategory[1]['@desc'] %} title="{{ subcategory[1]['@desc'] }}"{%- endif -%}{%- endcapture %}
                        <li {{ attrs }}>{{ subcategory[1]['@title'] }}
                          <ul>
            {%- endif -%}
            {%- for instance in subcategory[1] -%}
              {%- if site.developer %}
                            <!-- instance: {{ instance[0] }} -->
              {%- endif -%}
              {%- if instance[0] contains '@' -%}{%- continue -%}{%- endif -%}
              {%- capture docs_path4 -%}{%- endcapture -%}
              {%- if instance[0] != "" -%}{%- capture docs_path4 -%}/{{ instance[0] }}{%- endcapture %}{%- endif -%}
              {% if instance[1]['@permalink'] %}
                {%- capture docs_link -%}{{ instance[1]['@permalink'] }}{%- endcapture -%}
                {%- capture docs_url -%}{{ docs_link | replace: "/documents","" | append: "@" | replace: "/@","" }}{%- endcapture -%}
              {% else %}
                {%- capture docs_url -%}{{ docs_path1 }}{{ docs_path2 }}{{ docs_path3 }}{{ docs_path4 }}{%- endcapture -%}
                {%- capture docs_link -%}/documents{{ docs_url }}/{%- endcapture -%}
              {% endif %}
              {%- assign docs_item = instance[1]['@title'] -%}
              {%- if instance[1]['@permalink'] or instance[1]['@documents'] -%}
                {%- capture docs_item -%}<a href="{{ docs_link }}">{{ docs_item }}</a>{%- endcapture -%}
              {%- endif %}
              {%- capture docs_id -%}documents{{ docs_url | replace: "/", "-" }}{%- endcapture -%}
              {%- if docs_id == "documents" -%}{%- assign docs_id = "library" -%}{%- endif -%}
              {%- capture attrs -%}id="{{ docs_id }}" class="pcjs-explorer-item"{%- if instance[1]['@desc'] %} title="{{ instance[1]['@desc'] }}"{%- endif -%}{%- endcapture %}
                            <li {{ attrs }}>{{ docs_item }}</li>
            {%- endfor -%}
            {%- if subcategory[0] != "@instances" %}
                          </ul>
                        </li>
            {%- endif -%}
          {%- endfor -%}
          {%- if category[0] != "@instances" %}
                      </ul>
                    </li>
          {%- endif -%}
        {%- endfor %}
                  </ul>
                </li>
    {%- endfor %}
              </ul>
            </li>
          </ul>
